#ifndef AHB_H
#define AHB_H
void Open_AHB();
void Close_AHB();
unsigned short AHB_Read(unsigned int addr);
void AHB_Write(unsigned int addr, unsigned short data);
void AHB_Memory_Read(unsigned int addr_addr, unsigned int data_addr, unsigned int start_addr, unsigned int len, unsigned short *buf);
void AHB_Memory_Write(unsigned int addr_addr, unsigned int data_addr, unsigned int start_addr, unsigned int len, unsigned short *buf);
void AHB_Memory_Read_Fast(unsigned int addr_addr, unsigned int data_addr, unsigned int start_addr, unsigned int len, unsigned short *buf);
void AHB_Memory_Write_Fast(unsigned int addr_addr, unsigned int data_addr, unsigned int start_addr, unsigned int len, unsigned short *buf);
int AHB_FIFO_Read(unsigned int clk_addr, unsigned int data_addr, unsigned int full_addr, unsigned int empty_addr, unsigned int almost_empty_addr, unsigned int valid_addr, unsigned int len, unsigned short *buf, ...);
void AHB_FIFO_Write(unsigned int clk_addr, unsigned int data_addr, unsigned int len, unsigned short *buf);
int AHB_FIFO_Buf_Read(unsigned int clk_addr, unsigned int data_addr, unsigned int valid_addr, int len, unsigned short *buf, int buf_tail);

#if TIMETEST
double maxfiforead;
double minfiforead;
double tmpfiforead;
#endif
#endif
#define MAX_UDP_LENGTH 32753
